<html>
<head><meta charset="utf-8"><title>arm64e rustc using Apple LLVM · t-compiler/arm · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/index.html">t-compiler/arm</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html">arm64e rustc using Apple LLVM</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="203880879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203880879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203880879">(Jul 14 2020 at 20:07)</a>:</h4>
<p>Hello, I've been trying to use the Apple LLVM with rustc to get arm64e compilation in rust.<br>
The problem is, libstd and friends get built with <code>-arch arm64</code> rather than <code>-arch arm64e</code>, and I have no clue where it's getting the <code>-arch</code> parameter from, it's obviously not from the spec's <code>llvm_target</code>.</p>



<a name="203884912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203884912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203884912">(Jul 14 2020 at 20:38)</a>:</h4>
<p>C/C++ code, or Rust? AFAIK there's no place for <code>-arch</code> to exist, we just use the LLVM APIs to set these things, without synthesizing textual arguments (but I could be wrong?)</p>



<a name="203885038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885038">(Jul 14 2020 at 20:39)</a>:</h4>
<p>All I know is that the libstd libraries end up being compiled as arm64 when the llvm target is arm64e-apple-ios</p>



<a name="203885046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885046">(Jul 14 2020 at 20:39)</a>:</h4>
<p>i'll get logs in a bit</p>



<a name="203885127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885127">(Jul 14 2020 at 20:40)</a>:</h4>
<p>if it's not literally "-arch", it's either the LLVM triple, and/or the LLVM featureset</p>



<a name="203885144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885144">(Jul 14 2020 at 20:40)</a>:</h4>
<p>weird</p>



<a name="203885238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885238">(Jul 14 2020 at 20:41)</a>:</h4>
<p>I would expect changing <code>llvm_target</code> to be enough, but that's assuming <code>arm64e</code> means anything to LLVM - it might not</p>



<a name="203885273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885273">(Jul 14 2020 at 20:41)</a>:</h4>
<p>(e.g. Clang might be translating <code>arm64e</code> into a set of target features to enable)</p>



<a name="203885279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885279">(Jul 14 2020 at 20:41)</a>:</h4>
<p>I'm using the <code>apple/llvm-project</code> LLVM 10 branch</p>



<a name="203885298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885298">(Jul 14 2020 at 20:41)</a>:</h4>
<p>which very explicitly has an <code>arm64e-apple-ios</code> triple</p>



<a name="203885308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885308">(Jul 14 2020 at 20:41)</a>:</h4>
<p>sure, but I mean it might not be LLVM who interprets that</p>



<a name="203885315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885315">(Jul 14 2020 at 20:41)</a>:</h4>
<p>hm</p>



<a name="203885338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885338">(Jul 14 2020 at 20:41)</a>:</h4>
<p>e.g. LLVM might just ignore the <code>e</code> and expect a dozen target features to be passed</p>



<a name="203885407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885407">(Jul 14 2020 at 20:42)</a>:</h4>
<p>I think I've seen code in LLVM that just ignores stuff you throw onto the end of one of the triple fields</p>



<a name="203885433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885433">(Jul 14 2020 at 20:42)</a>:</h4>
<p>anyway, cc <span class="user-mention" data-user-id="124289">@Hanna Kruppe</span>, I remember looking through LLVM and not finding much useful</p>



<a name="203885480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885480">(Jul 14 2020 at 20:43)</a>:</h4>
<p>if you have a local checkout of the Apple LLVM, you might be able to search around for arm64e, especially in <code>llvm/lib</code> (i.e. ignore tests)</p>



<a name="203885484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885484">(Jul 14 2020 at 20:43)</a>:</h4>
<p>in the end all that matters is that it generates BRAA/BLRAA instructions for rust programs</p>



<a name="203885520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885520">(Jul 14 2020 at 20:43)</a>:</h4>
<p>sure, we just don't know what controls that in LLVM</p>



<a name="203885609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885609">(Jul 14 2020 at 20:44)</a>:</h4>
<p>at most you have a Clang flag that you can trust, but Clang can do arbitrarily much work to turn that into LLVM configuration</p>



<a name="203885613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885613">(Jul 14 2020 at 20:44)</a>:</h4>
<p>arm64e only appears once in clang, in a test</p>



<a name="203885653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885653">(Jul 14 2020 at 20:44)</a>:</h4>
<p>wait DAMMIT</p>



<a name="203885661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885661">(Jul 14 2020 at 20:44)</a>:</h4>
<p>an easy way to check would be to look at LLVM IR generated by Clang when you pass that triple</p>



<a name="203885662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885662">(Jul 14 2020 at 20:44)</a>:</h4>
<p>this is the wrong llvm i've been grepping in</p>



<a name="203885669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885669">(Jul 14 2020 at 20:44)</a>:</h4>
<p><span class="user-mention" data-user-id="312033">@aspen</span> actually, can you do something like <code>echo - | clang -s -emit-llvm -o foo.ll -x c -</code> and make it arm64e?</p>



<a name="203885688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885688">(Jul 14 2020 at 20:44)</a>:</h4>
<p>I should've suggested this weeks ago Q_Q</p>



<a name="203885689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885689">(Jul 14 2020 at 20:44)</a>:</h4>
<p>half the point of arm64e is BLRAA/BRAA instructions</p>



<a name="203885710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885710">(Jul 14 2020 at 20:45)</a>:</h4>
<p>and <span class="user-mention" data-user-id="124289">@Hanna Kruppe</span> said before I did, damn</p>



<a name="203885729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885729">(Jul 14 2020 at 20:45)</a>:</h4>
<p>pointer authentication fails and results in a segfault if you try to run an arm64 program as arm64e</p>



<a name="203885733"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885733" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885733">(Jul 14 2020 at 20:45)</a>:</h4>
<p>I forgot that the LLVM IR dumps tend to have a lot of the LLVM configuration in them</p>



<a name="203885770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885770">(Jul 14 2020 at 20:45)</a>:</h4>
<p>yeah but we don't care about the machine code, we care about how Clang configures LLVM</p>



<a name="203885776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885776">(Jul 14 2020 at 20:45)</a>:</h4>
<p>i've tried a bunch of things:</p>
<ul>
<li>changing the llvm triple in the IR</li>
<li>adding XPACI instructions to the ASM</li>
</ul>



<a name="203885848"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885848" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885848">(Jul 14 2020 at 20:46)</a>:</h4>
<p>(since we have to replicate what Clang does, through the LLVM API)</p>



<a name="203885883"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885883" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885883">(Jul 14 2020 at 20:46)</a>:</h4>
<p>so anyway if you can get me an arm64e otherwise-empty <code>foo.ll</code> from that command, it might be useful</p>



<a name="203885944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885944">(Jul 14 2020 at 20:47)</a>:</h4>
<p>clang: error: -emit-llvm cannot be used when linking</p>



<a name="203885966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885966">(Jul 14 2020 at 20:47)</a>:</h4>
<p>uhhh is it <code>-S</code> for assembly?</p>



<a name="203885988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203885988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203885988">(Jul 14 2020 at 20:47)</a>:</h4>
<p>or maybe <code>-c</code> and <code>-s</code></p>



<a name="203886014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886014">(Jul 14 2020 at 20:47)</a>:</h4>
<p>-c ought to work</p>



<a name="203886021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886021">(Jul 14 2020 at 20:47)</a>:</h4>
<p>sorry, I tend to rely on godbolt for most of this nowdays</p>



<a name="203886049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886049">(Jul 14 2020 at 20:48)</a>:</h4>
<p><span class="user-mention" data-user-id="124289">@Hanna Kruppe</span> doesn't it create <code>.bc</code> w/o the assembly flag?</p>



<a name="203886103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886103">(Jul 14 2020 at 20:48)</a>:</h4>
<p>oh right, ugh</p>



<a name="203886119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886119">(Jul 14 2020 at 20:48)</a>:</h4>
<p>bad default imo</p>



<a name="203886149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886149">(Jul 14 2020 at 20:48)</a>:</h4>
<div class="codehilite"><pre><span></span><code>; ModuleID = &#39;-&#39;
source_filename = &quot;-&quot;
target datalayout = &quot;e-m:o-i64:64-i128:128-n32:64-S128&quot;
target triple = &quot;arm64e-apple-ios7.0.0&quot;

!llvm.module.flags = !{!0, !1, !2}
!llvm.ident = !{!3}

!0 = !{i32 2, !&quot;SDK Version&quot;, [2 x i32] [i32 10, i32 14]}
!1 = !{i32 1, !&quot;wchar_size&quot;, i32 4}
!2 = !{i32 7, !&quot;PIC Level&quot;, i32 2}
!3 = !{!&quot;Apple LLVM version 10.0.1 (clang-1001.0.46.4)&quot;}
</code></pre></div>



<a name="203886157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886157">(Jul 14 2020 at 20:48)</a>:</h4>
<p>oh and you can do the same with <code>echo - | rustc --crate-type=lib --emit=llvm-ir -o bar.ll -</code>, so we can compare what's wrong</p>



<a name="203886190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886190">(Jul 14 2020 at 20:48)</a>:</h4>
<p>huh weird, does the LLVM IR dump omit target features?</p>



<a name="203886207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886207">(Jul 14 2020 at 20:49)</a>:</h4>
<div class="codehilite"><pre><span></span><code>❯ echo - | clang -arch arm64e --target=arm64e-apple-ios -S -emit-llvm -o foo.ll -x c -
clang: warning: using sysroot for &#39;MacOSX&#39; but targeting &#39;iPhone&#39; [-Wincompatible-sysroot]
</code></pre></div>



<a name="203886217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886217">(Jul 14 2020 at 20:49)</a>:</h4>
<p>It doesn't include target features implied by the triple</p>



<a name="203886240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886240">(Jul 14 2020 at 20:49)</a>:</h4>
<p>So seems like the triple is all we should need</p>



<a name="203886243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886243">(Jul 14 2020 at 20:49)</a>:</h4>
<p>so that would suggest the triple is enough?</p>



<a name="203886345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886345">(Jul 14 2020 at 20:50)</a>:</h4>
<p><span class="user-mention" data-user-id="312033">@aspen</span> but you have <code>llvm_target: "arm64e-apple-ios7.0.0"</code>, right?</p>



<a name="203886364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886364">(Jul 14 2020 at 20:50)</a>:</h4>
<p>since you said you tried that and it didn't work</p>



<a name="203886403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886403">(Jul 14 2020 at 20:50)</a>:</h4>
<p>I hope it's not the <code>"SDK Version"</code> :P</p>



<a name="203886486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886486">(Jul 14 2020 at 20:51)</a>:</h4>
<p>the problem was libstd being built for arm64, while other things were being built for arm64e</p>



<a name="203886657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886657">(Jul 14 2020 at 20:52)</a>:</h4>
<p>i'm doing a build rn to test</p>



<a name="203886828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886828">(Jul 14 2020 at 20:53)</a>:</h4>
<div class="codehilite"><pre><span></span><code>❯ rg -j6 -p -F &quot;arm64e&quot; src/llvm-project/clang
src/llvm-project/clang/test/CodeGenObjCXX/synthesized-property-cleanup.mm
1:// RUN: %clang_cc1 -triple arm64e-apple-ios13.0 -debug-info-kind=standalone -fobjc-arc -fsanitize=nullability-return \
</code></pre></div>



<a name="203886888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886888">(Jul 14 2020 at 20:54)</a>:</h4>
<p>how do you run <code>x.py</code>?</p>



<a name="203886933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886933">(Jul 14 2020 at 20:54)</a>:</h4>
<p><code>./x.py build</code></p>



<a name="203886942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886942">(Jul 14 2020 at 20:54)</a>:</h4>
<p><span class="user-mention silent" data-user-id="312033">aspen</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/arm64e.20rustc.20using.20Apple.20LLVM/near/203886486">said</a>:</p>
<blockquote>
<p>the problem was libstd being built for arm64, while other things were being built for arm64e</p>
</blockquote>
<p>okay this wasn't clear at all, this is a real crucial bit</p>



<a name="203886946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886946">(Jul 14 2020 at 20:54)</a>:</h4>
<p>with a config.toml</p>



<a name="203886976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203886976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203886976">(Jul 14 2020 at 20:54)</a>:</h4>
<p>did you check things like <code>libcore-*.rlib</code>?</p>



<a name="203887015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887015">(Jul 14 2020 at 20:55)</a>:</h4>
<p>and how are you checking that they're arm64 or arm64e?</p>



<a name="203887045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887045">(Jul 14 2020 at 20:55)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/arm64e.20rustc.20using.20Apple.20LLVM/near/203887015">said</a>:</p>
<blockquote>
<p>and how are you checking that they're arm64 or arm64e?</p>
</blockquote>
<p>the linker errors if you try to link arm64 to arm64e</p>



<a name="203887060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887060">(Jul 14 2020 at 20:55)</a>:</h4>
<p>like I'm thinking maybe you're using/looking at the wrong libstd and that's why. but I find it hard to believe that it'd happen</p>



<a name="203887101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887101">(Jul 14 2020 at 20:55)</a>:</h4>
<p><span class="user-mention" data-user-id="312033">@aspen</span> okay so it could be C/C++ code and not Rust code that's causing that, right?</p>



<a name="203887119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887119">(Jul 14 2020 at 20:55)</a>:</h4>
<p>possibly</p>



<a name="203887212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887212">(Jul 14 2020 at 20:56)</a>:</h4>
<p>maybe <code>rm -rf build/*/stage1-std</code> and run <code>x.py build --stage 1 src/libstd -vv</code></p>



<a name="203887262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887262">(Jul 14 2020 at 20:57)</a>:</h4>
<p>maybe it will just show the <code>arm64-</code> offender</p>



<a name="203887270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887270">(Jul 14 2020 at 20:57)</a>:</h4>
<div class="codehilite"><pre><span></span><code>❯ rg -j6 -p -F &quot;arm64e&quot; llvm/lib
llvm/lib/Support/Triple.cpp
402:    .Case(&quot;arm64e&quot;, Triple::aarch64)
566:  if (SubArchName == &quot;arm64e&quot;)

llvm/lib/Support/ARMTargetParser.cpp
281:  else if (A.startswith(&quot;arm64e&quot;))

llvm/lib/Object/MachOObjectFile.cpp
2566:      return &quot;Mach-O arm64e&quot;;
2694:        *ArchFlag = &quot;arm64e&quot;;
2695:      return Triple(&quot;arm64e-apple-darwin&quot;);
2746:      &quot;armv7s&quot;, &quot;arm64&quot;,  &quot;arm64e&quot;,   &quot;arm64_32&quot;,&quot;ppc&quot;,    &quot;ppc64&quot;,

llvm/lib/LTO/LTOCodeGenerator.cpp
368:    else if (Triple.getArchName() == &quot;arm64e&quot;)

llvm/lib/LTO/LTOModule.cpp
224:    else if (Triple.getArchName() == &quot;arm64e&quot;)

llvm/lib/BinaryFormat/MachO.cpp
61:  if (T.getArchName() == &quot;arm64e&quot;)

llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
56:    if (TT.getArchName() == &quot;arm64e&quot;)

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
5607:      Subtarget-&gt;getTargetTriple().getArchName() == &quot;arm64e&quot;) {

llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
909:      report_fatal_error(&quot;arm64e LR authentication requires ptrauth&quot;);
1427:        report_fatal_error(&quot;arm64e LR authentication requires ptrauth&quot;);

llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
222:  if (CPU.empty() &amp;&amp; TT.getArchName() == &quot;arm64e&quot;)
303:      TT.getArchName() != &quot;arm64e&quot; &amp;&amp;
</code></pre></div>



<a name="203887272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887272">(Jul 14 2020 at 20:57)</a>:</h4>
<p>or <code>aarch64-</code></p>



<a name="203887370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887370">(Jul 14 2020 at 20:58)</a>:</h4>
<p>okay that grep is useful, thanks! most of that stuff isn't in upstream LLVM, I think specifically the <code>llvm/lib/Target/AArch64</code> parts matter most</p>



<a name="203887395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887395">(Jul 14 2020 at 20:58)</a>:</h4>
<p>so between that and what <span class="user-mention" data-user-id="124289">@Hanna Kruppe</span> said, it <em>should</em> just be the triple</p>



<a name="203887398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887398">(Jul 14 2020 at 20:58)</a>:</h4>
<p>yeah this stuff is apparently MEANT to be upstreamed but ha that ain't happening for a while</p>



<a name="203887405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887405">(Jul 14 2020 at 20:58)</a>:</h4>
<div class="codehilite"><pre><span></span><code>  // arm64e requires v8.3a and only runs on vortex and later CPUs.
  if (Triple.getArchName() == &quot;arm64e&quot;) {
    // Honor -mcpu as long it doesn&#39;t specify an older CPU than &quot;vortex&quot;.
    if (CPU.size() &amp;&amp; (CPU != &quot;cyclone&quot;))
      return CPU;

    // Otherwise default to &quot;vortex&quot;.
    return &quot;vortex&quot;;
  }
</code></pre></div>



<a name="203887494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887494">(Jul 14 2020 at 20:59)</a>:</h4>
<p>and the problem being limited to libstd makes me think it's cc-rs all over again</p>



<a name="203887512"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887512" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887512">(Jul 14 2020 at 20:59)</a>:</h4>
<p>same</p>



<a name="203887625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887625">(Jul 14 2020 at 21:00)</a>:</h4>
<p>i'm going to try to patch everything to use my cc-rs which I added arm64e stuff too</p>



<a name="203887660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887660">(Jul 14 2020 at 21:00)</a>:</h4>
<p><span class="user-mention" data-user-id="312033">@aspen</span> oh one way you can dig deeper into this is <code>build/*/stage1-std/arm64e-.../release/build</code> (or <code>stage2-std</code>, whichever you have built for the target) should contain the native dependencies that may have been built by <code>cc-rs</code></p>



<a name="203887686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887686">(Jul 14 2020 at 21:00)</a>:</h4>
<p>i made the target <code>aarch64-apple-ios-armv83</code> because it was easier than trying to get cc-rs to cooperate</p>



<a name="203887692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887692">(Jul 14 2020 at 21:01)</a>:</h4>
<p>the rust target name*</p>



<a name="203887712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887712">(Jul 14 2020 at 21:01)</a>:</h4>
<p>and so you can <code>file</code> each static library or w/e you find in there until you find the wrong one</p>



<a name="203887732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887732">(Jul 14 2020 at 21:01)</a>:</h4>
<p>oh that's probably the reason, heh</p>



<a name="203887740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203887740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203887740">(Jul 14 2020 at 21:01)</a>:</h4>
<p>so rustc's use of LLVM is probably fine</p>



<a name="203888091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888091">(Jul 14 2020 at 21:04)</a>:</h4>
<p><span class="user-mention" data-user-id="312033">@aspen</span> for me, <code>file build/*/stage*-std/*/release/build/*/out/*.o</code> shows a lot of x86-64 ELFs</p>



<a name="203888103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888103">(Jul 14 2020 at 21:04)</a>:</h4>
<p>so that's probably what you want to check</p>



<a name="203888319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888319">(Jul 14 2020 at 21:06)</a>:</h4>
<p>And you set that triple in the target?</p>



<a name="203888327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888327">(Jul 14 2020 at 21:06)</a>:</h4>
<p>also, most of the files are in this directory, for me:<br>
<code>build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-40c9c6172d2c78d4/out/</code><br>
so if I look at this file:<br>
<code>build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release/build/compiler_builtins-40c9c6172d2c78d4/output</code><br>
I can see all of the <code>clang</code> invocations</p>



<a name="203888376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888376">(Jul 14 2020 at 21:06)</a>:</h4>
<p>and that they all pass <code>--target=x86_64-unknown-linux-gnu</code></p>



<a name="203888384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888384">(Jul 14 2020 at 21:06)</a>:</h4>
<p>so you'll probably find your problem there</p>



<a name="203888436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888436">(Jul 14 2020 at 21:07)</a>:</h4>
<p>e.g. something like</p>
<div class="codehilite"><pre><span></span><code><span class="gi">+pub fn target() -&gt; TargetResult {</span>
<span class="gi">+    let mut base = super::apple_base::opts();</span>
<span class="gi">+    base.cpu = &quot;apple-a12&quot;.to_string();</span>
<span class="gi">+    base.max_atomic_width = Some(128);</span>
<span class="gi">+    base.eliminate_frame_pointer = false;</span>
<span class="gi">+    base.pre_link_args.insert(LinkerFlavor::Gcc, vec![&quot;-arch&quot;.to_string(), &quot;arm64&quot;.to_string()]);</span>
<span class="gi">+</span>
<span class="gi">+    // This is a hack; why doesn&#39;t this get picked up?</span>
<span class="gi">+    base.post_link_args.insert(LinkerFlavor::Gcc, vec![&quot;-lz&quot;.to_string()]);</span>
<span class="gi">+    base.link_env_remove.extend(super::apple_base::macos_link_env_remove());</span>
<span class="gi">+    base.stack_probes = true;</span>
<span class="gi">+</span>
<span class="gi">+    // Clang automatically chooses a more specific target based on</span>
<span class="gi">+    // MACOSX_DEPLOYMENT_TARGET.  To enable cross-language LTO to work</span>
<span class="gi">+    // correctly, we do too.</span>
<span class="gi">+    let arch = &quot;aarch64&quot;;</span>
<span class="gi">+    let llvm_target = super::apple_base::macos_llvm_target(&amp;arch);</span>
<span class="gi">+</span>
<span class="gi">+    Ok(Target {</span>
<span class="gi">+        llvm_target: &quot;MY_TRIPLE_HERE&quot;,</span>
<span class="gi">+        target_endian: &quot;little&quot;.to_string(),</span>
<span class="gi">+        target_pointer_width: &quot;64&quot;.to_string(),</span>
<span class="gi">+        target_c_int_width: &quot;32&quot;.to_string(),</span>
<span class="gi">+        data_layout: &quot;FIXME&quot;.to_string(),</span>
<span class="gi">+        arch: arch.to_string(),</span>
<span class="gi">+        target_os: &quot;macos&quot;.to_string(),</span>
<span class="gi">+        target_env: String::new(),</span>
<span class="gi">+        target_vendor: &quot;apple&quot;.to_string(),</span>
<span class="gi">+        linker_flavor: LinkerFlavor::Gcc,</span>
<span class="gi">+        options: TargetOptions { target_mcount: &quot;\u{1}mcount&quot;.to_string(), ..base },</span>
<span class="gi">+    })</span>
<span class="gi">+}</span>
</code></pre></div>



<a name="203888561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888561">(Jul 14 2020 at 21:08)</a>:</h4>
<p>data layout is same according to llvm IR</p>



<a name="203888596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888596">(Jul 14 2020 at 21:08)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="k">use</span><span class="w"> </span><span class="k">super</span>::<span class="n">apple_sdk_base</span>::<span class="p">{</span><span class="n">opts</span><span class="p">,</span><span class="w"> </span><span class="n">AppleOS</span><span class="p">,</span><span class="w"> </span><span class="n">Arch</span><span class="p">};</span><span class="w"></span>
<span class="k">use</span><span class="w"> </span><span class="k">crate</span>::<span class="n">spec</span>::<span class="p">{</span><span class="n">LinkerFlavor</span><span class="p">,</span><span class="w"> </span><span class="n">Target</span><span class="p">,</span><span class="w"> </span><span class="n">TargetOptions</span><span class="p">,</span><span class="w"> </span><span class="n">TargetResult</span><span class="p">};</span><span class="w"></span>

<span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">target</span><span class="p">()</span><span class="w"> </span>-&gt; <span class="nc">TargetResult</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">base</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">opts</span><span class="p">(</span><span class="n">Arch</span>::<span class="n">Arm64e</span><span class="p">,</span><span class="w"> </span><span class="n">AppleOS</span>::<span class="n">iOS</span><span class="p">)</span><span class="o">?</span><span class="p">;</span><span class="w"></span>
<span class="w">    </span><span class="nb">Ok</span><span class="p">(</span><span class="n">Target</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="n">llvm_target</span>: <span class="s">&quot;arm64e-apple-ios&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="n">target_endian</span>: <span class="s">&quot;little&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="n">target_pointer_width</span>: <span class="s">&quot;64&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="n">target_c_int_width</span>: <span class="s">&quot;32&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="n">data_layout</span>: <span class="s">&quot;e-m:o-i64:64-i128:128-n32:64-S128&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="n">arch</span>: <span class="s">&quot;aarch64&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="n">target_os</span>: <span class="s">&quot;ios&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="n">target_env</span>: <span class="nb">String</span>::<span class="n">new</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="n">target_vendor</span>: <span class="s">&quot;apple&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">        </span><span class="n">linker_flavor</span>: <span class="nc">LinkerFlavor</span>::<span class="n">Gcc</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">options</span>: <span class="nc">TargetOptions</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="n">features</span>: <span class="s">&quot;+neon,+fp-armv8,+apple-a12&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">            </span><span class="n">eliminate_frame_pointer</span>: <span class="nc">false</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="n">max_atomic_width</span>: <span class="nc">Some</span><span class="p">(</span><span class="mi">128</span><span class="p">),</span><span class="w"></span>
<span class="w">            </span><span class="n">unsupported_abis</span>: <span class="nc">super</span>::<span class="n">arm_base</span>::<span class="n">unsupported_abis</span><span class="p">(),</span><span class="w"></span>
<span class="w">            </span><span class="n">forces_embed_bitcode</span>: <span class="nc">true</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="c1">// Taken from a clang build on Xcode 11.4.1.</span>
<span class="w">            </span><span class="c1">// These arguments are not actually invoked - they just have</span>
<span class="w">            </span><span class="c1">// to look right to pass App Store validation.</span>
<span class="w">            </span><span class="n">bitcode_llvm_cmdline</span>: <span class="s">&quot;-triple</span><span class="se">\0</span><span class="s">\</span>
<span class="s">                arm64e-apple-ios7.0.0</span><span class="se">\0</span><span class="s">\</span>
<span class="s">                -emit-obj</span><span class="se">\0</span><span class="s">\</span>
<span class="s">                -disable-llvm-passes</span><span class="se">\0</span><span class="s">\</span>
<span class="s">                -target-abi</span><span class="se">\0</span><span class="s">\</span>
<span class="s">                darwinpcs</span><span class="se">\0</span><span class="s">\</span>
<span class="s">                -Os</span><span class="se">\0</span><span class="s">&quot;</span><span class="w"></span>
<span class="w">                </span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">            </span><span class="o">..</span><span class="n">base</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">})</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="203888723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888723">(Jul 14 2020 at 21:09)</a>:</h4>
<p>yeah no I'd bet money on this being <code>cc-rs</code></p>



<a name="203888770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888770">(Jul 14 2020 at 21:10)</a>:</h4>
<p>especially since the only clue in the Rust target is at the very end</p>



<a name="203888807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888807">(Jul 14 2020 at 21:10)</a>:</h4>
<p>and if <code>cc-rs</code> doesn't know about it, there's no way it would generate <code>--target=arm64e-...</code> clang invocations</p>



<a name="203888827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888827">(Jul 14 2020 at 21:10)</a>:</h4>
<p>partially off topic but I am actually wearing a hoodie that has "ARM64E" printed on the left arm right now</p>



<a name="203888836"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888836" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888836">(Jul 14 2020 at 21:10)</a>:</h4>
<p>lol</p>



<a name="203888855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203888855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203888855">(Jul 14 2020 at 21:10)</a>:</h4>
<p>try the <code>file build/*/stage*-std/*/release/build/*/out/*.o</code> command and I bet you'll see that it's those</p>



<a name="203889440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203889440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203889440">(Jul 14 2020 at 21:16)</a>:</h4>
<p><a href="https://github.com/shepmaster/rust/blob/silicon/silicon/README.md#troubleshooting">https://github.com/shepmaster/rust/blob/silicon/silicon/README.md#troubleshooting</a></p>



<a name="203889450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203889450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203889450">(Jul 14 2020 at 21:16)</a>:</h4>
<p>sorry this might take a while</p>



<a name="203889476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203889476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203889476">(Jul 14 2020 at 21:16)</a>:</h4>
<p><a href="https://github.com/alexcrichton/cc-rs/commit/c9a3544f5aa492cea77901609a5658a896341ffe">https://github.com/alexcrichton/cc-rs/commit/c9a3544f5aa492cea77901609a5658a896341ffe</a></p>



<a name="203889488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203889488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203889488">(Jul 14 2020 at 21:16)</a>:</h4>
<p>also btw i'm trying to build for arm64e on iOS, not macOS</p>



<a name="203889521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203889521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203889521">(Jul 14 2020 at 21:17)</a>:</h4>
<p><a href="https://github.com/rust-lang/libc/commit/8c2daaea67da75f4b4234cf116432a1ab49c72c6">https://github.com/rust-lang/libc/commit/8c2daaea67da75f4b4234cf116432a1ab49c72c6</a></p>



<a name="203889525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203889525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203889525">(Jul 14 2020 at 21:17)</a>:</h4>
<p>but thanks it's probably still useful</p>



<a name="203891609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203891609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203891609">(Jul 14 2020 at 21:36)</a>:</h4>
<p>woops i accidentally did <code>gfind -name Cargo.toml -delete</code> instead of <code>gfind -name Cargo.lock -delete</code></p>



<a name="203892945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203892945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203892945">(Jul 14 2020 at 21:51)</a>:</h4>
<p><span class="user-mention silent" data-user-id="312033">aspen</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/arm64e.20rustc.20using.20Apple.20LLVM/near/203889450">said</a>:</p>
<blockquote>
<p>sorry this might take a while</p>
</blockquote>
<p>ah I thought you just had a build laying around</p>



<a name="203898137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203898137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203898137">(Jul 14 2020 at 22:54)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error[E0597]: `queries` does not live long enough
   --&gt; src/librustc_interface/queries.rs:386:21
    |
386 |         let ret = f(&amp;queries);
    |                     ^^^^^^^^ borrowed value does not live long enough
...
397 |     }
    |     -
    |     |
    |     `queries` dropped here while still borrowed
    |     borrow might be used here, when `queries` is dropped and runs the destructor for type `queries::Queries&lt;&#39;_&gt;`
``` i didn&#39;t even touch this file
</code></pre></div>



<a name="203898157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203898157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203898157">(Jul 14 2020 at 22:54)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/arm64e.20rustc.20using.20Apple.20LLVM/near/203892945">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="312033">aspen</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/arm64e.20rustc.20using.20Apple.20LLVM/near/203889450">said</a>:</p>
<blockquote>
<p>sorry this might take a while</p>
</blockquote>
<p>ah I thought you just had a build laying around</p>
</blockquote>
<p>no it's been a while since i tried this and i wanna have a serious go at it</p>



<a name="203902217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203902217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203902217">(Jul 14 2020 at 23:48)</a>:</h4>
<p>uhh how did you get that error?</p>



<a name="203902238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203902238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203902238">(Jul 14 2020 at 23:48)</a>:</h4>
<p>I mean, what command do you use, and/or what flags in <code>config.toml</code> (or <code>RUSTFLAGS</code>)?</p>



<a name="203902412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203902412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203902412">(Jul 14 2020 at 23:51)</a>:</h4>
<p>i'm pretty sure i messed up my repo</p>



<a name="203904077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203904077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203904077">(Jul 15 2020 at 00:17)</a>:</h4>
<p>is there any way to regenerate all lockfiles?</p>



<a name="203905137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203905137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203905137">(Jul 15 2020 at 00:32)</a>:</h4>
<p><span class="user-mention" data-user-id="312033">@aspen</span> what do you mean all? there's only one, at the top level</p>



<a name="203905143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203905143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203905143">(Jul 15 2020 at 00:32)</a>:</h4>
<p>woops my bad, i discovered that lol</p>



<a name="203906147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203906147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203906147">(Jul 15 2020 at 00:49)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/arm64e.20rustc.20using.20Apple.20LLVM/near/203905137">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="312033">aspen</span> what do you mean all? there's only one, at the top level</p>
</blockquote>
<p>still getting the error</p>



<a name="203906155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203906155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203906155">(Jul 15 2020 at 00:49)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="k">[llvm]</span>
<span class="n">optimize</span> <span class="o">=</span> <span class="kc">true</span>
<span class="n">ccache</span> <span class="o">=</span> <span class="kc">true</span>
<span class="n">ninja</span> <span class="o">=</span> <span class="kc">true</span>
<span class="n">targets</span> <span class="o">=</span> <span class="s">&quot;AArch64;X86&quot;</span>
<span class="n">experimental-targets</span> <span class="o">=</span> <span class="s">&quot;&quot;</span>

<span class="k">[build]</span>
<span class="n">target</span> <span class="o">=</span> <span class="k">[&quot;aarch64-apple-ios-armv83&quot;]</span>
<span class="n">docs</span> <span class="o">=</span> <span class="kc">false</span>

<span class="k">[install]</span>
<span class="n">prefix</span> <span class="o">=</span> <span class="s">&quot;/home/aleister/Builds/rust-arm64e&quot;</span>
<span class="n">sysconfdir</span> <span class="o">=</span> <span class="s">&quot;etc&quot;</span>
<span class="n">localstatedir</span> <span class="o">=</span> <span class="s">&quot;var/lib&quot;</span>

<span class="k">[rust]</span>
<span class="n">optimize</span> <span class="o">=</span> <span class="kc">true</span>
<span class="n">incremental</span> <span class="o">=</span> <span class="kc">true</span>
<span class="n">parallel-compiler</span> <span class="o">=</span> <span class="kc">true</span>
</code></pre></div>



<a name="203906169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203906169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203906169">(Jul 15 2020 at 00:49)</a>:</h4>
<p>oh lmao</p>



<a name="203906170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203906170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203906170">(Jul 15 2020 at 00:50)</a>:</h4>
<p>turn off <code>parallel-compiler</code></p>



<a name="203906214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203906214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203906214">(Jul 15 2020 at 00:50)</a>:</h4>
<p>I wonder if we lost the ability to CI that (cc <span class="user-mention" data-user-id="116122">@simulacrum</span>)</p>



<a name="203906219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203906219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203906219">(Jul 15 2020 at 00:50)</a>:</h4>
<p>it's not production-ready anyway</p>



<a name="203906224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203906224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203906224">(Jul 15 2020 at 00:50)</a>:</h4>
<p>oh, oof</p>



<a name="203906235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203906235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203906235">(Jul 15 2020 at 00:50)</a>:</h4>
<p>(and <code>optimize = true</code> is the default anyway btw, you only need <code>incremental = true</code>)</p>



<a name="203906241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203906241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203906241">(Jul 15 2020 at 00:51)</a>:</h4>
<p>same for <code>optimize = true</code> for <code>[llvm]</code></p>



<a name="203906247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203906247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203906247">(Jul 15 2020 at 00:51)</a>:</h4>
<p>it's on ci pretty sure</p>



<a name="203907615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203907615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203907615">(Jul 15 2020 at 01:16)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> </p>
<div class="codehilite"><pre><span></span><code> error: failed to add native library /Users/aleister/Code/rust/build/x86_64-apple-darwin/stage2-std/aarch64-apple-ios-armv83/release/build/compiler_builtins-48f236aac7ca5deb/out/libcompiler-rt.a: file too small to be an archive

error: aborting due to previous error

The following warnings were emitted during compilation:

warning: warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: /Users/aleister/Code/rust/build/x86_64-apple-darwin/stage2-std/aarch64-apple-ios-armv83/release/build/compiler_builtins-48f236aac7ca5deb/out/libcompiler-rt.a will be fat and ar(1) will not be able to operate on it

error: could not compile `compiler_builtins`.

To learn more, run the command again with --verbose.
</code></pre></div>



<a name="203907632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203907632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203907632">(Jul 15 2020 at 01:16)</a>:</h4>
<p>uh oh</p>



<a name="203907638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203907638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203907638">(Jul 15 2020 at 01:17)</a>:</h4>
<p>I have no idea how to deal with that. cc <span class="user-mention" data-user-id="123586">@nagisa</span></p>



<a name="203907728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203907728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203907728">(Jul 15 2020 at 01:18)</a>:</h4>
<p>also lovely spam of <code>'vortex' is not a recognized processor for this target (ignoring processor)</code></p>



<a name="203907736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203907736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203907736">(Jul 15 2020 at 01:18)</a>:</h4>
<p>like 3k lines of just that</p>



<a name="203908661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203908661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203908661">(Jul 15 2020 at 01:39)</a>:</h4>
<p>for <code>vortex</code> its being set in either target definition or via <code>-Ctarget-cpu</code>.</p>



<a name="203908806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203908806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203908806">(Jul 15 2020 at 01:42)</a>:</h4>
<div class="codehilite"><pre><span></span><code>file too small to be an archive
</code></pre></div>


<p>is almost certainly the outcome from the <code>ranlib</code> warning.</p>



<a name="203908824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203908824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203908824">(Jul 15 2020 at 01:42)</a>:</h4>
<p>you can try asking rustc to use the external archiver one that supports fat archives.</p>



<a name="203908946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203908946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203908946">(Jul 15 2020 at 01:45)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/55235">https://github.com/rust-lang/rust/issues/55235</a> possibly is what you're hitting.</p>



<a name="203909051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909051">(Jul 15 2020 at 01:47)</a>:</h4>
<p>looks like we might have removed the option to use the external archiver though</p>



<a name="203909065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909065">(Jul 15 2020 at 01:47)</a>:</h4>
<p>We’re using the LLVM’s one.</p>



<a name="203909118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909118">(Jul 15 2020 at 01:48)</a>:</h4>
<p>that’s <code>llvm::Archive</code> set of APIs.</p>



<a name="203909127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909127">(Jul 15 2020 at 01:48)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error: build failed
command did not execute successfully: &quot;/Users/aleister/Code/rust/build/x86_64-apple-darwin/stage0/bin/cargo&quot; &quot;build&quot; &quot;--target&quot; &quot;aarch64-apple-ios-armv83&quot; &quot;-Zbinary-dep-depinfo&quot; &quot;-j&quot; &quot;6&quot; &quot;--release&quot; &quot;--features&quot; &quot;panic-unwind compiler-builtins-c&quot; &quot;--manifest-path&quot; &quot;/Users/aleister/Code/rust/src/libtest/Cargo.toml&quot; &quot;--message-format&quot; &quot;json-render-diagnostics&quot;
expected success, got: exit code: 101
failed to run: /Users/aleister/Code/rust/build/bootstrap/debug/bootstrap build
Build completed unsuccessfully in 0:27:46
</code></pre></div>



<a name="203909658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909658">(Jul 15 2020 at 02:00)</a>:</h4>
<p>Semi-unrelated, but is it possible to get Rust to dynamically link against an external LLVM?</p>



<a name="203909662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909662">(Jul 15 2020 at 02:00)</a>:</h4>
<p>Would be convenient for package managers.</p>



<a name="203909689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909689">(Jul 15 2020 at 02:01)</a>:</h4>
<p>yes.</p>



<a name="203909743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909743">(Jul 15 2020 at 02:02)</a>:</h4>
<p>how?</p>



<a name="203909749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909749">(Jul 15 2020 at 02:02)</a>:</h4>
<p>specify <code>llvm-config</code> in config.toml. I think that’s it? Might be something more.</p>



<a name="203909775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909775">(Jul 15 2020 at 02:03)</a>:</h4>
<p><code>llvm.link-shared = true</code> too.</p>



<a name="203909995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203909995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203909995">(Jul 15 2020 at 02:08)</a>:</h4>
<p>ah, nice</p>



<a name="203911240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911240">(Jul 15 2020 at 02:35)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> alright, i got the infamous libstd error</p>



<a name="203911293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911293">(Jul 15 2020 at 02:36)</a>:</h4>
<p><a href="https://ghostbin.co/paste/dwyfq">https://ghostbin.co/paste/dwyfq</a></p>



<a name="203911296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911296">(Jul 15 2020 at 02:36)</a>:</h4>
<p>it's big so i had to bin it</p>



<a name="203911319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911319">(Jul 15 2020 at 02:37)</a>:</h4>
<p>uh oh</p>



<a name="203911375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911375">(Jul 15 2020 at 02:38)</a>:</h4>
<p>hmm it looks like the <code>.rlib</code>s may be marked with the wrong arch?</p>



<a name="203911381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911381">(Jul 15 2020 at 02:38)</a>:</h4>
<p>and here's the output of that file command: <a href="https://ghostbin.co/paste/ja6mw">https://ghostbin.co/paste/ja6mw</a></p>



<a name="203911416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911416">(Jul 15 2020 at 02:39)</a>:</h4>
<p>huh</p>



<a name="203911421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911421">(Jul 15 2020 at 02:39)</a>:</h4>
<p>so that's compiled correctly</p>



<a name="203911489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911489">(Jul 15 2020 at 02:40)</a>:</h4>
<p>weird</p>



<a name="203911490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911490">(Jul 15 2020 at 02:40)</a>:</h4>
<p><span class="user-mention" data-user-id="312033">@aspen</span> okay what about <code>file build/x86_64-apple-darwin/stage2-std/aarch64-apple-ios-armv83/release/deps/libcore-*.rlib</code>?</p>



<a name="203911626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911626">(Jul 15 2020 at 02:44)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> <code>build/x86_64-apple-darwin/stage2-std/aarch64-apple-ios-armv83/release/deps/libcore-6060273b593c2b48.rlib: current ar archive</code></p>
<p>that's it</p>



<a name="203911629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911629">(Jul 15 2020 at 02:44)</a>:</h4>
<p>disappointing :P</p>



<a name="203911636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911636">(Jul 15 2020 at 02:44)</a>:</h4>
<p>you can try <code>ar tv</code> on it</p>



<a name="203911639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911639">(Jul 15 2020 at 02:44)</a>:</h4>
<p>maybe that lists obj file arch</p>



<a name="203911703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911703">(Jul 15 2020 at 02:46)</a>:</h4>
<p><a href="https://ghostbin.co/paste/pj7e3">https://ghostbin.co/paste/pj7e3</a></p>



<a name="203911705"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911705" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911705">(Jul 15 2020 at 02:46)</a>:</h4>
<p>nope it's just basically ls -la</p>



<a name="203911724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911724">(Jul 15 2020 at 02:47)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> ```<br>
❯ lipo -info  build/x86_64-apple-darwin/stage2-std/aarch64-apple-ios-armv83/release/deps/libcore-6060273b593c2b48.rlib<br>
Non-fat file: build/x86_64-apple-darwin/stage2-std/aarch64-apple-ios-armv83/release/deps/libcore-6060273b593c2b48.rlib is architecture: arm64</p>
<div class="codehilite"><pre><span></span><code>
</code></pre></div>



<a name="203911725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911725">(Jul 15 2020 at 02:47)</a>:</h4>
<p><span class="user-mention" data-user-id="312033">@aspen</span> okay stackoverflow says <code>lipo -info</code> might work</p>



<a name="203911727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911727">(Jul 15 2020 at 02:47)</a>:</h4>
<p>lol</p>



<a name="203911788"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911788" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911788">(Jul 15 2020 at 02:48)</a>:</h4>
<p>okay so we create the <code>ar</code> incorrectly, I'm guessing? no idea what determines that though</p>



<a name="203911789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911789">(Jul 15 2020 at 02:48)</a>:</h4>
<p>wait</p>



<a name="203911820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911820">(Jul 15 2020 at 02:49)</a>:</h4>
<p><span class="user-mention" data-user-id="312033">@aspen</span> <code>ar x core-6060273b593c2b48.11ngxyrhxgjdepis.rcgu.o build/x86_64-apple-darwin/stage2-std/aarch64-apple-ios-armv83/release/deps/libcore-6060273b593c2b48.rlib</code> maybe? the order might be swapped</p>



<a name="203911829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911829">(Jul 15 2020 at 02:49)</a>:</h4>
<p>and then <code>file</code> the <code>.o</code></p>



<a name="203911876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911876">(Jul 15 2020 at 02:50)</a>:</h4>
<div class="codehilite"><pre><span></span><code>❯ file core-6060273b593c2b48.11ngxyrhxgjdepis.rcgu.o
core-6060273b593c2b48.11ngxyrhxgjdepis.rcgu.o: Mach-O 64-bit object arm64
</code></pre></div>



<a name="203911887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911887">(Jul 15 2020 at 02:51)</a>:</h4>
<p>so we're not passing the right LLVM target :/</p>



<a name="203911952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911952">(Jul 15 2020 at 02:52)</a>:</h4>
<p><code>llvm_target: "arm64e-apple-ios".to_string(),</code></p>



<a name="203911961"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911961" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911961">(Jul 15 2020 at 02:52)</a>:</h4>
<p>yet if I do <code>-arch arm64e --target=arm64e-apple-ios</code> with the Apple clang, it generates a proper arm64e binary</p>



<a name="203911967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911967">(Jul 15 2020 at 02:53)</a>:</h4>
<p>does it work without <code>-arch arm64e</code>?</p>



<a name="203911968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911968">(Jul 15 2020 at 02:53)</a>:</h4>
<p>dunno never tried it</p>



<a name="203911970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911970">(Jul 15 2020 at 02:53)</a>:</h4>
<p>maybe it passes <code>-arch</code> to LLVM in a way we don't</p>



<a name="203911972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911972">(Jul 15 2020 at 02:53)</a>:</h4>
<p>but i should've modified cc-rs to pass that</p>



<a name="203911983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203911983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203911983">(Jul 15 2020 at 02:53)</a>:</h4>
<p>should be easy to try on an empty file</p>



<a name="203912051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203912051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203912051">(Jul 15 2020 at 02:55)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="w">                </span><span class="k">if</span><span class="w"> </span><span class="n">target</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="s">&quot;darwin&quot;</span><span class="p">)</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">target</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="s">&quot;ios&quot;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="k">if</span><span class="w"> </span><span class="n">target</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="s">&quot;x86_64&quot;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="n">cmd</span><span class="p">.</span><span class="n">args</span><span class="p">.</span><span class="n">push</span><span class="p">(</span><span class="s">&quot;-arch&quot;</span><span class="p">.</span><span class="n">into</span><span class="p">());</span><span class="w"></span>
<span class="w">                        </span><span class="n">cmd</span><span class="p">.</span><span class="n">args</span><span class="p">.</span><span class="n">push</span><span class="p">(</span><span class="s">&quot;x86_64&quot;</span><span class="p">.</span><span class="n">into</span><span class="p">());</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="n">target</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="s">&quot;aarch64&quot;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="n">cmd</span><span class="p">.</span><span class="n">args</span><span class="p">.</span><span class="n">push</span><span class="p">(</span><span class="s">&quot;-arch&quot;</span><span class="p">.</span><span class="n">into</span><span class="p">());</span><span class="w"></span>
<span class="w">                        </span><span class="k">if</span><span class="w"> </span><span class="n">abi</span><span class="p">.</span><span class="n">contains</span><span class="p">(</span><span class="s">&quot;armv83&quot;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                            </span><span class="n">cmd</span><span class="p">.</span><span class="n">args</span><span class="p">.</span><span class="n">push</span><span class="p">(</span><span class="s">&quot;arm64e&quot;</span><span class="p">.</span><span class="n">into</span><span class="p">());</span><span class="w"></span>
<span class="w">                        </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                            </span><span class="n">cmd</span><span class="p">.</span><span class="n">args</span><span class="p">.</span><span class="n">push</span><span class="p">(</span><span class="s">&quot;arm64&quot;</span><span class="p">.</span><span class="n">into</span><span class="p">());</span><span class="w"></span>
<span class="w">                        </span><span class="p">}</span><span class="w"></span>
<span class="w">                    </span><span class="p">}</span><span class="w"></span>
<span class="w">                </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="203912058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203912058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203912058">(Jul 15 2020 at 02:55)</a>:</h4>
<p>let me eprintln the abi</p>



<a name="203912318"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203912318" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203912318">(Jul 15 2020 at 03:00)</a>:</h4>
<p><code>ABI is armv83</code> ok good</p>



<a name="203912397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203912397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203912397">(Jul 15 2020 at 03:03)</a>:</h4>
<p>oop i might've found the problem</p>



<a name="203912398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203912398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203912398">(Jul 15 2020 at 03:03)</a>:</h4>
<p>cc-rs as expected</p>



<a name="203912461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203912461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203912461">(Jul 15 2020 at 03:04)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="w">            </span><span class="s">&quot;arm64&quot;</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="s">&quot;aarch64&quot;</span><span class="w"> </span><span class="o">=&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="k">if</span><span class="w"> </span><span class="n">abi</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="s">&quot;armv83&quot;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="n">ArchSpec</span>::<span class="n">Device</span><span class="p">(</span><span class="s">&quot;arm64e&quot;</span><span class="p">)</span><span class="w"></span>
<span class="w">                </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                    </span><span class="n">ArchSpec</span>::<span class="n">Device</span><span class="p">(</span><span class="s">&quot;arm64&quot;</span><span class="p">)</span><span class="w"></span>
<span class="w">                </span><span class="p">}</span><span class="w"></span>
<span class="w">            </span><span class="p">},</span><span class="w"></span>
</code></pre></div>



<a name="203912464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203912464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203912464">(Jul 15 2020 at 03:04)</a>:</h4>
<p>ok that should work</p>



<a name="203912688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203912688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203912688">(Jul 15 2020 at 03:10)</a>:</h4>
<p>actually,</p>
<div class="codehilite"><pre><span></span><code><span class="n">cmd</span><span class="p">.</span><span class="n">args</span><span class="p">.</span><span class="n">push</span><span class="p">(</span><span class="s">&quot;--triple=arm64e-apple-ios&quot;</span><span class="p">.</span><span class="n">into</span><span class="p">());</span><span class="w"></span>
<span class="n">ArchSpec</span>::<span class="n">Device</span><span class="p">(</span><span class="s">&quot;arm64e&quot;</span><span class="p">)</span><span class="w"></span>
</code></pre></div>



<a name="203976737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203976737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203976737">(Jul 15 2020 at 16:12)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> it errors with that despite me not being able to find arm64 by itself in an entire -vvv log</p>



<a name="203976880"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203976880" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203976880">(Jul 15 2020 at 16:13)</a>:</h4>
<p><a href="/user_uploads/4715/8M0MUuVXWRVr91oHd8UturnI/build.log">build.log</a></p>



<a name="203976908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203976908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203976908">(Jul 15 2020 at 16:13)</a>:</h4>
<p>wait a seconddd<br>
what's this</p>
<div class="codehilite"><pre><span></span><code>   Compiling std v0.0.0 (/Users/aleister/Code/rust/src/libstd)
     Running `CARGO=/Users/aleister/Code/rust/build/x86_64-apple-darwin/stage0/bin/cargo CARGO_MANIFEST_DIR=/Users/aleister/Code/cc-rs CARGO_PKG_AUTHORS=&#39;Alex Crichton &lt;alex@alexcrichton.com&gt;&#39; CARGO_PKG_DESCRIPTION=&#39;A build-time dependency for Cargo build scripts to assist in invoking the native
C compiler to compile native C code into a static archive to be linked into Rust
code.
&#39; CARGO_PKG
</code></pre></div>



<a name="203977044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203977044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203977044">(Jul 15 2020 at 16:14)</a>:</h4>
<p>wait nvm that's just a package description that wrapped lmao</p>



<a name="203977327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/203977327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#203977327">(Jul 15 2020 at 16:17)</a>:</h4>
<p>Do I need to edit libc or compiler_builtins?</p>



<a name="204039698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204039698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204039698">(Jul 16 2020 at 03:01)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> <span class="user-mention" data-user-id="123586">@nagisa</span> got any idea on what's going on with this mess?</p>



<a name="204072566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204072566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204072566">(Jul 16 2020 at 11:48)</a>:</h4>
<p>Not without spending time to look into this.</p>



<a name="204073001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204073001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204073001">(Jul 16 2020 at 11:54)</a>:</h4>
<p>alright</p>



<a name="204092234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204092234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204092234">(Jul 16 2020 at 14:37)</a>:</h4>
<p>any way I can help figure this out?</p>



<a name="204247862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204247862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204247862">(Jul 17 2020 at 19:21)</a>:</h4>
<p>So wait, how are rlibs generated?</p>



<a name="204247877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204247877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204247877">(Jul 17 2020 at 19:21)</a>:</h4>
<p>What's responsible for compiling and packing their objects specifically?</p>



<a name="204248228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248228">(Jul 17 2020 at 19:24)</a>:</h4>
<p>The backend (rustc_codegen_llvm) is responsible for emitting object files and packing them into an ar archive. This is then given the <code>.rlib</code> extension.</p>



<a name="204248273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248273">(Jul 17 2020 at 19:25)</a>:</h4>
<p>Hm, why are the emitted object files ending up being <code>arm64</code> rather than <code>arm64e</code> even tho a -vvv build shows all <code>-arch arm64e</code> and no <code>-arch arm64</code></p>



<a name="204248390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248390">(Jul 17 2020 at 19:26)</a>:</h4>
<p>Are the rustc generated object files <code>arm64</code> or the object files originating from a C compiler?</p>



<a name="204248414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248414">(Jul 17 2020 at 19:26)</a>:</h4>
<p>the object files within the rlibs</p>



<a name="204248419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248419">(Jul 17 2020 at 19:26)</a>:</h4>
<p>this results in compiling rustc to fail</p>



<a name="204248427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248427">(Jul 17 2020 at 19:26)</a>:</h4>
<p>Do the object files in question have the <code>.rcgu.o</code> extension?</p>



<a name="204248440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248440">(Jul 17 2020 at 19:26)</a>:</h4>
<p>yes</p>



<a name="204248447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248447">(Jul 17 2020 at 19:27)</a>:</h4>
<div class="codehilite"><pre><span></span><code>❯ file core-6060273b593c2b48.11ngxyrhxgjdepis.rcgu.o
core-6060273b593c2b48.11ngxyrhxgjdepis.rcgu.o: Mach-O 64-bit object arm64
</code></pre></div>



<a name="204248474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248474">(Jul 17 2020 at 19:27)</a>:</h4>
<p>What is the target spec?</p>



<a name="204248538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248538">(Jul 17 2020 at 19:28)</a>:</h4>
<p><code>arm64e-apple-ios</code><br>
I am compiling rustc using the Apple LLVM, where this IS a valid triple (on Apple clang, you can do <code>-arch arm64e --target arm64e-apple-ios</code></p>



<a name="204248652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248652">(Jul 17 2020 at 19:29)</a>:</h4>
<p>What is the definition in librustc_target?</p>



<a name="204248704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248704">(Jul 17 2020 at 19:30)</a>:</h4>
<p>that IS it</p>



<a name="204248750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204248750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204248750">(Jul 17 2020 at 19:30)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span>  <a href="https://github.com/Crabapple-iOS/rust/blob/arm64e-apple-ios/src/librustc_target/spec/aarch64_apple_ios_armv83.rs">https://github.com/Crabapple-iOS/rust/blob/arm64e-apple-ios/src/librustc_target/spec/aarch64_apple_ios_armv83.rs</a></p>



<a name="204249090"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204249090" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204249090">(Jul 17 2020 at 19:34)</a>:</h4>
<p>If you are using apples LLVM fork it seems that it should work: <a href="https://github.com/apple/llvm-project/pull/1297">https://github.com/apple/llvm-project/pull/1297</a></p>



<a name="204249123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204249123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204249123">(Jul 17 2020 at 19:34)</a>:</h4>
<p>yes</p>



<a name="204249132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204249132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204249132">(Jul 17 2020 at 19:34)</a>:</h4>
<p>i suspect i may need to edit libc or compiler_builtins</p>



<a name="204249152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204249152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204249152">(Jul 17 2020 at 19:35)</a>:</h4>
<p>wait</p>



<a name="204249153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204249153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204249153">(Jul 17 2020 at 19:35)</a>:</h4>
<p>that's  newer branch</p>



<a name="204249310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204249310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204249310">(Jul 17 2020 at 19:37)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> that's clang code tho?</p>



<a name="204252736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204252736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204252736">(Jul 17 2020 at 20:11)</a>:</h4>
<p>Oops. I traced the transitive caller back to a piece of code that adds <code>-arch</code> as LLVM arg together with the return value of that function.</p>



<a name="204252775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204252775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204252775">(Jul 17 2020 at 20:11)</a>:</h4>
<p>Hm?</p>



<a name="204252777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204252777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204252777">(Jul 17 2020 at 20:11)</a>:</h4>
<p>well i still added it locally</p>



<a name="204252936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204252936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204252936">(Jul 17 2020 at 20:12)</a>:</h4>
<p>Have you set <code>options.llvm_args</code> in the target spec?</p>



<a name="204253179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204253179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204253179">(Jul 17 2020 at 20:14)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span>  nope but <code>LinkArgs</code> is set</p>



<a name="204253390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204253390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204253390">(Jul 17 2020 at 20:17)</a>:</h4>
<p>Try setting <code>options.llvm_args</code> to <code>vec!["-arch".to_string(), "arm64e".to_string()]</code>.</p>



<a name="204255152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204255152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204255152">(Jul 17 2020 at 20:29)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> </p>
<div class="codehilite"><pre><span></span><code>rustc: Unknown command line argument &#39;-arch&#39;.  Try: &#39;rustc --help&#39;
rustc: Did you mean &#39;-h&#39;?
rustc: Unknown command line argument &#39;arm64e&#39;.  Try: &#39;rustc --help&#39;
rustc: Unknown command line argument &#39;--target&#39;.  Try: &#39;rustc --help&#39;
rustc: Did you mean &#39;--stats&#39;?
rustc: Unknown command line argument &#39;arm64e-apple-ios&#39;.  Try: &#39;rustc --help&#39;
</code></pre></div>


<div class="codehilite"><pre><span></span><code><span class="w">            </span><span class="n">llvm_args</span>: <span class="nc">vec</span><span class="o">!</span><span class="p">[</span><span class="w"></span>
<span class="w">                </span><span class="s">&quot;-arch&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">                </span><span class="s">&quot;arm64e&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">                </span><span class="s">&quot;--target&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">                </span><span class="s">&quot;arm64e-apple-ios&quot;</span><span class="p">.</span><span class="n">to_string</span><span class="p">(),</span><span class="w"></span>
<span class="w">            </span><span class="p">],</span><span class="w"></span>
</code></pre></div>



<a name="204255467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204255467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204255467">(Jul 17 2020 at 20:31)</a>:</h4>
<p>That was a linker arg, not an LLVM arch. Oops. <a href="https://github.com/llvm/llvm-project/blob/42170b3b4e1f7d30b377a3da07c354feae9b852e/clang/lib/Driver/ToolChains/Darwin.cpp#L162">https://github.com/llvm/llvm-project/blob/42170b3b4e1f7d30b377a3da07c354feae9b852e/clang/lib/Driver/ToolChains/Darwin.cpp#L162</a></p>



<a name="204255631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204255631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204255631">(Jul 17 2020 at 20:32)</a>:</h4>
<p>I was just doing the exact args you pass to clang.</p>



<a name="204267305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204267305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204267305">(Jul 17 2020 at 22:35)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/arm64e.20rustc.20using.20Apple.20LLVM/near/204255467">said</a>:</p>
<blockquote>
<p>That was a linker arg, not an LLVM arch. Oops. <a href="https://github.com/llvm/llvm-project/blob/42170b3b4e1f7d30b377a3da07c354feae9b852e/clang/lib/Driver/ToolChains/Darwin.cpp#L162">https://github.com/llvm/llvm-project/blob/42170b3b4e1f7d30b377a3da07c354feae9b852e/clang/lib/Driver/ToolChains/Darwin.cpp#L162</a></p>
</blockquote>
<p>wait what'd you mean</p>



<a name="204318713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204318713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204318713">(Jul 18 2020 at 21:31)</a>:</h4>
<p>I genuinely cannot think of why the object files would be generated as arm64.</p>



<a name="204318903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204318903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204318903">(Jul 18 2020 at 21:36)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> <span class="user-mention" data-user-id="123586">@nagisa</span> I'm really sorry to ping again, but I can't find anyone else who might be able to help with this.</p>



<a name="204319120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204319120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204319120">(Jul 18 2020 at 21:42)</a>:</h4>
<p>I think it's in codegen_llvm, actually.</p>



<a name="204320378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204320378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204320378">(Jul 18 2020 at 22:17)</a>:</h4>
<p>all stage2-std objects are being built as arm64.</p>



<a name="204322288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204322288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204322288">(Jul 18 2020 at 23:21)</a>:</h4>
<p>I’m not really in a position to help. I lack context for one and I’ve no idea about how Apple's toolchain operates, though I do know that it has some particularities unique to the platform.</p>



<a name="204322336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204322336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204322336">(Jul 18 2020 at 23:22)</a>:</h4>
<p>I would suggest you take the compiler at whatever stage you end up failing on and try building objects for most trivial rust files and verify they do things you expect.</p>



<a name="204322342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204322342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204322342">(Jul 18 2020 at 23:23)</a>:</h4>
<p>I wouldn’t be super surprised if you needed some additional cpu features or something along those lines set.</p>



<a name="204322347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204322347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204322347">(Jul 18 2020 at 23:23)</a>:</h4>
<p>being able to experiment with those kinds of things directly on the CLI would make your roundtrip times significantly shorter.</p>



<a name="204323605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204323605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204323605">(Jul 19 2020 at 00:07)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> um I think i found the issue... it's <code>-c</code> in the cc command</p>



<a name="204323616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204323616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204323616">(Jul 19 2020 at 00:07)</a>:</h4>
<p>plausible, I guess. I doubt the plain object files will contain within them the architecture/target they're for.</p>



<a name="204323655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204323655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204323655">(Jul 19 2020 at 00:08)</a>:</h4>
<p>and when its archived the archiver could be making a best effort guess?</p>



<a name="204323670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204323670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204323670">(Jul 19 2020 at 00:09)</a>:</h4>
<p>As usual, it all boils down to cc-rs.</p>



<a name="204323980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204323980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204323980">(Jul 19 2020 at 00:19)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> new error!</p>
<div class="codehilite"><pre><span></span><code>running: &quot;cc&quot; &quot;-O3&quot; &quot;-fPIC&quot; &quot;-arch&quot; &quot;arm64e&quot; &quot;--target=arm64e-apple-ios&quot; &quot;-arch&quot; &quot;arm64e&quot; &quot;-miphoneos-version-min=7.0&quot; &quot;-isysroot&quot; &quot;/Library/Developer/CommandLineTools/SDKs/iPhoneOS13.4.sdk&quot; &quot;-fembed-bitcode&quot; &quot;-fPIC&quot; &quot;-arch&quot; &quot;arm64e&quot; &quot;--target=arm64e-apple-ios&quot; &quot;-arch&quot; &quot;arm64e&quot; &quot;-miphoneos-version-min=7.0&quot; &quot;-isysroot&quot; &quot;/Library/Developer/CommandLineTools/SDKs/iPhoneOS13.4.sdk&quot; &quot;-fembed-bitcode&quot; &quot;-fno-builtin&quot; &quot;-fvisibility=hidden&quot; &quot;-ffreestanding&quot; &quot;-fomit-frame-pointer&quot; &quot;-DVISIBILITY_HIDDEN&quot; &quot;-o&quot; &quot;/Users/aleister/Code/rust/build/x86_64-apple-darwin/stage2-std/aarch64-apple-ios-armv83/release/build/compiler_builtins-651650f79ef2454c/out/absvdi2.o&quot; &quot;/Users/aleister/Code/rust/src/llvm-project/compiler-rt/lib/builtins/absvdi2.c&quot;
cargo:warning=Undefined symbols for architecture arm64e:
cargo:warning=  &quot;___compilerrt_abort_impl&quot;, referenced from:
cargo:warning=      ___absvdi2 in absvdi2-de6259.o
cargo:warning=  &quot;_main&quot;, referenced from:
cargo:warning=     implicit entry/start for main executable
cargo:warning=ld: symbol(s) not found for architecture arm64e
</code></pre></div>



<a name="204324102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324102">(Jul 19 2020 at 00:22)</a>:</h4>
<p>Well… now that you removed the <code>-c</code> its trying to build an actual executable binary I think.</p>



<a name="204324107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324107">(Jul 19 2020 at 00:22)</a>:</h4>
<p>which is probably… wrong.</p>



<a name="204324109"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324109" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324109">(Jul 19 2020 at 00:22)</a>:</h4>
<p>wait, what's -c do?</p>



<a name="204324117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324117">(Jul 19 2020 at 00:23)</a>:</h4>
<p>It makes the C compiler to stop after assembling (i.e. outputs an <code>.o</code> file)</p>



<a name="204324127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324127">(Jul 19 2020 at 00:23)</a>:</h4>
<p>I suspect that what you might want to look into is not removing the <code>-c</code> but rather looking into where these <code>.o</code> files are archived into an <code>.a</code> (a static library)</p>



<a name="204324203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324203">(Jul 19 2020 at 00:26)</a>:</h4>
<p>i thought .a's were just archives of .o's and nothing more</p>



<a name="204324250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324250">(Jul 19 2020 at 00:26)</a>:</h4>
<p>well "just archives" are just that, but they also (probably?) contain some metadata about their contents.</p>



<a name="204324314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324314">(Jul 19 2020 at 00:28)</a>:</h4>
<p>Including, most likely the architecture these object files are meant for.</p>



<a name="204324322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324322">(Jul 19 2020 at 00:29)</a>:</h4>
<p>that's my guess anyway.</p>



<a name="204324375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324375">(Jul 19 2020 at 00:30)</a>:</h4>
<p>hm i looked, that's <code>ranlib</code>'s territory, setting arches</p>



<a name="204324393"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204324393" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204324393">(Jul 19 2020 at 00:31)</a>:</h4>
<p>or well, <code>libtool</code></p>



<a name="204353992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204353992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204353992">(Jul 19 2020 at 14:49)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> <span class="user-mention" data-user-id="123586">@nagisa</span> this is weird</p>
<div class="codehilite"><pre><span></span><code>❯ lipo -info &quot;/Users/aleister/Code/rust/build/x86_64-apple-darwin/stage2-std/aarch64-apple-ios-armv83/release/build/compiler_builtins-651650f79ef2454c/out/libcompiler-rt.a&quot;
Non-fat file: /Users/aleister/Code/rust/build/x86_64-apple-darwin/stage2-std/aarch64-apple-ios-armv83/release/build/compiler_builtins-651650f79ef2454c/out/libcompiler-rt.a is architecture: arm64e
</code></pre></div>



<a name="204354006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354006">(Jul 19 2020 at 14:49)</a>:</h4>
<p>oh hm, it's libstd and friends that are compiled wrong</p>



<a name="204354074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354074">(Jul 19 2020 at 14:51)</a>:</h4>
<p>How are <code>.rcgu.o</code> files created?</p>



<a name="204354236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354236">(Jul 19 2020 at 14:54)</a>:</h4>
<p>The object file write code is at <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_codegen_llvm/back/write.rs">https://github.com/rust-lang/rust/blob/master/src/librustc_codegen_llvm/back/write.rs</a></p>



<a name="204354242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354242">(Jul 19 2020 at 14:54)</a>:</h4>
<p>thanks<br>
since it's just the libstd <code>.rcgu.o</code> files that are arm64</p>



<a name="204354372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354372">(Jul 19 2020 at 14:56)</a>:</h4>
<p><span class="user-mention" data-user-id="133247">@bjorn3</span> do you know why only libstd's .o files would be the wrong arch?</p>



<a name="204354383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354383">(Jul 19 2020 at 14:57)</a>:</h4>
<p>libcore is wrong too, right?</p>



<a name="204354387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354387">(Jul 19 2020 at 14:57)</a>:</h4>
<p>libcompiler-rt.a is correct, as it is created by the C compiler.</p>



<a name="204354396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354396">(Jul 19 2020 at 14:58)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/arm64e.20rustc.20using.20Apple.20LLVM/near/204354383">said</a>:</p>
<blockquote>
<p>libcore is wrong too, right?</p>
</blockquote>
<p>think so</p>



<a name="204354437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354437">(Jul 19 2020 at 14:58)</a>:</h4>
<p>I've tried using printlns to see if the correct triple gets passed, and it is?</p>



<a name="204354439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354439">(Jul 19 2020 at 14:58)</a>:</h4>
<p>and I'm using the Apple LLVM for this</p>



<a name="204354441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354441">(Jul 19 2020 at 14:58)</a>:</h4>
<p>rather than the rust LLVM</p>



<a name="204354819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204354819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204354819">(Jul 19 2020 at 15:04)</a>:</h4>
<p>wait a sec</p>



<a name="204355191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204355191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204355191">(Jul 19 2020 at 15:10)</a>:</h4>
<p>My llvm-project submodule was on the wrong branch? SOmehow?</p>



<a name="204355588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204355588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204355588">(Jul 19 2020 at 15:18)</a>:</h4>
<p>You need to commit the submodule changes in the Rust repo.</p>



<a name="204355890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204355890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204355890">(Jul 19 2020 at 15:27)</a>:</h4>
<p>Checkout the commit you want in llvm-project, then cd back up out of it and commit the llvm directory.</p>



<a name="204355931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204355931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204355931">(Jul 19 2020 at 15:28)</a>:</h4>
<p>The build system resets the sub modules back to the checked in version.</p>



<a name="204358137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204358137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204358137">(Jul 19 2020 at 16:14)</a>:</h4>
<p><code>aarch64-apple-ios-armv83</code> compiled succesfully</p>



<a name="204361900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204361900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204361900">(Jul 19 2020 at 17:39)</a>:</h4>
<p>FWIW, <a href="https://github.com/rust-lang/rustc-dev-guide/pull/805">https://github.com/rust-lang/rustc-dev-guide/pull/805</a></p>



<a name="204361954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204361954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204361954">(Jul 19 2020 at 17:40)</a>:</h4>
<p>ha, nice</p>



<a name="204361958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204361958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204361958">(Jul 19 2020 at 17:40)</a>:</h4>
<p>sadly this will have to stay in a fork rn, due to the fact that it uses an entirely different LLVM</p>



<a name="204361967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204361967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204361967">(Jul 19 2020 at 17:40)</a>:</h4>
<p>yup. That's the way the AVR port was for 3-4 years</p>



<a name="204362234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362234">(Jul 19 2020 at 17:46)</a>:</h4>
<p><span class="user-mention" data-user-id="312033">@aspen</span> wait so this was entirely due to using non-Apple LLVM, the entire time?</p>



<a name="204362302"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362302" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362302">(Jul 19 2020 at 17:48)</a>:</h4>
<p>kind of a footgun, I wish git submodules weren't such a mess. if they were integrated better with switching branches, rebasing, etc. then <code>x.py</code> wouldn't have to forcefully update them and trash your work :/</p>



<a name="204362310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362310">(Jul 19 2020 at 17:48)</a>:</h4>
<p>also, a commit in the outer repo isn't strictly necessary, but <code>git add src/llvm-project</code> is the minimum necessary</p>



<a name="204362330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362330">(Jul 19 2020 at 17:49)</a>:</h4>
<p>Not doing a commit seems like another footgun waiting to go off.</p>



<a name="204362392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362392">(Jul 19 2020 at 17:51)</a>:</h4>
<p>the difference is once you do <code>git add</code>, it looks as if it's committed already to anything that's not actively trying to destroy changes</p>



<a name="204362476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362476">(Jul 19 2020 at 17:53)</a>:</h4>
<p>like something would have to use <code>git reset</code> to undo that and that's a big nono to put in a tool that isn't a <code>git</code> frontend</p>



<a name="204362600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362600">(Jul 19 2020 at 17:54)</a>:</h4>
<p>anyway yeah, commit is best, just saying it starts working at <code>git add</code> and beyond that it's your choice how permanent it is</p>



<a name="204362669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362669">(Jul 19 2020 at 17:55)</a>:</h4>
<p>When working on AVR, my Rust branch was usually about 30-odd <code>git commit -m 'add cherry-picks'</code>. Easy enough to squash when I was done.</p>



<a name="204362674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362674">(Jul 19 2020 at 17:55)</a>:</h4>
<p>(this means you don't have to make a dozen "outer" commits if you're testing a dozen versions of <code>src/llvm-project</code>, such as when tweaking things around)</p>



<a name="204362739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362739">(Jul 19 2020 at 17:56)</a>:</h4>
<p>then again, I kinda learned this the hard way so maybe nobody should listen to me :P</p>



<a name="204362760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362760">(Jul 19 2020 at 17:56)</a>:</h4>
<p>I think everyone touching LLVM learns that your local changes are checked out in the hard way.</p>



<a name="204362773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362773">(Jul 19 2020 at 17:57)</a>:</h4>
<p>I'm just mad submodules don't have sane enough defaults to make this a non-problem <em>sigh</em></p>



<a name="204362892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362892">(Jul 19 2020 at 17:59)</a>:</h4>
<p>I guess there is one alternative... have <code>x.py</code> iterate through <code>git reflog</code> and look for a past "outer" commit which is responsible for the current state of the submodule, suggesting that it's <em>stale</em>, as opposed to <em>locally modified</em></p>



<a name="204362910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204362910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204362910">(Jul 19 2020 at 17:59)</a>:</h4>
<p>but that's more of a form of protest than a reasonable path to go down</p>



<a name="204364087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204364087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204364087">(Jul 19 2020 at 18:16)</a>:</h4>
<p>And whatever is happening with clippy / rustfmt (I forget which) with subtrees</p>



<a name="204364234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204364234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204364234">(Jul 19 2020 at 18:21)</a>:</h4>
<p>just clippy for now, but it's so much better omg</p>



<a name="204364283"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204364283" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204364283">(Jul 19 2020 at 18:22)</a>:</h4>
<p>submodules should be considered an anti-pattern for "downstream" code that depends on often-changing details of the parent repo</p>



<a name="204364295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204364295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204364295">(Jul 19 2020 at 18:23)</a>:</h4>
<p>whereas LLVM would be "upstream" I guess</p>



<a name="204373906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204373906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204373906">(Jul 19 2020 at 22:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/242906-t-compiler.2Farm/topic/arm64e.20rustc.20using.20Apple.20LLVM/near/204362234">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="312033">aspen</span> wait so this was entirely due to using non-Apple LLVM, the entire time?</p>
</blockquote>
<p>yeah pretty much</p>



<a name="204373908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204373908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204373908">(Jul 19 2020 at 22:41)</a>:</h4>
<p>i'd changed the branch</p>



<a name="204373910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204373910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204373910">(Jul 19 2020 at 22:41)</a>:</h4>
<p>and I'd thought I'd changed it properly</p>



<a name="204373911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204373911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204373911">(Jul 19 2020 at 22:41)</a>:</h4>
<p>but a <code>git reset --hard</code> proved me otherwise</p>



<a name="204373915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204373915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204373915">(Jul 19 2020 at 22:41)</a>:</h4>
<p>Here's the Rust patch: <a href="https://github.com/luxxxxy/Rust-iOS-Nightlies/blob/master/patches/rust.diff">https://github.com/luxxxxy/Rust-iOS-Nightlies/blob/master/patches/rust.diff</a><br>
The LLVM patch: <a href="https://github.com/luxxxxy/Rust-iOS-Nightlies/blob/master/patches/llvm.diff">https://github.com/luxxxxy/Rust-iOS-Nightlies/blob/master/patches/llvm.diff</a></p>
<p>neither of these can ever be actually PR'd lmao</p>



<a name="204376058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204376058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204376058">(Jul 19 2020 at 23:49)</a>:</h4>
<p>Not as-is maybe, but it’s a good start to when llvm upstream gets support.</p>



<a name="204376603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204376603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204376603">(Jul 20 2020 at 00:07)</a>:</h4>
<p>yeah but then someone will probably try to name it <code>aarch64e</code> or something stupid like that</p>



<a name="204377457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204377457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204377457">(Jul 20 2020 at 00:33)</a>:</h4>
<p>... wait does the LLVM IR need to have PAC instructions?</p>



<a name="204379006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204379006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> aspen <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204379006">(Jul 20 2020 at 01:22)</a>:</h4>
<p>t-compiler/llvm thread: <a href="#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/How.20to.20get.20rustc.20to.20generate.20LLVM.20IR.20differently.3F/near/204378955">https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/How.20to.20get.20rustc.20to.20generate.20LLVM.20IR.20differently.3F/near/204378955</a></p>



<a name="204813867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/204813867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Steve Klabnik <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#204813867">(Jul 23 2020 at 15:37)</a>:</h4>
<p>I will be getting a transition kit on the 11th <span aria-label="confetti" class="emoji emoji-1f38a" role="img" title="confetti">:confetti:</span></p>



<a name="205660663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/205660663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Steve Klabnik <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#205660663">(Aug 01 2020 at 03:00)</a>:</h4>
<p>hello from... a computer</p>



<a name="205660668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/205660668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Steve Klabnik <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#205660668">(Aug 01 2020 at 03:00)</a>:</h4>
<p>I am interested in trying to work on this if there's anything you all need help with!</p>



<a name="205695155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/205695155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#205695155">(Aug 01 2020 at 19:36)</a>:</h4>
<p>There’s been a fair amount of work in <a href="#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/Pointer.20authentication.20support.20in.20Rust's.20LLVM.20codegen">this stream</a>.</p>



<a name="205749701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/205749701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#205749701">(Aug 03 2020 at 00:04)</a>:</h4>
<p>It's also worth pointing out that one arbitrary Apple developer said "don't even worry about trying to do this yet" (specifically for arm64<strong>e</strong>, so it seems likely that this won't be any kind of requirement for the first release of Intel Macs.</p>



<a name="205769874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/205769874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#205769874">(Aug 03 2020 at 08:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116155">@Jake Goulding</span> Apple the company has announced they are not going to provide arm64e to users yet.</p>



<a name="205770065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/205770065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#205770065">(Aug 03 2020 at 08:23)</a>:</h4>
<p><a href="https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication">https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication</a></p>
<blockquote>
<p>App Store Connect and Testflight don’t yet accept submissions with an arm64e slice. Xcode removes this slice from your app bundle when you upload it.</p>
</blockquote>



<a name="205770297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/242906-t-compiler/arm/topic/arm64e%20rustc%20using%20Apple%20LLVM/near/205770297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> XAMPPRocky <a href="https://rust-lang.github.io/zulip_archive/stream/242906-t-compiler/arm/topic/arm64e.20rustc.20using.20Apple.20LLVM.html#205770297">(Aug 03 2020 at 08:26)</a>:</h4>
<p>You can build apps with it right now though, you just can’t distribute them on Apple’s platforms.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>